<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>StringCaseSense</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>StringCaseSense</h1>

<p>Determines whether string comparisons are case sensitive (default is &quot;not case sensitive&quot;).</p>

<pre class="Syntax">StringCaseSense, On|Off|Locale</pre>
<h3>Parameters</h3>
<dl>

  <dt>On|Off|Locale</dt>
  <dd><p><strong>On</strong>: String comparisons are case sensitive. This setting also makes the <a href="../Variables.htm#equal">expression equal sign operator (=)</a> and the case-insensitive mode of <a href="../Functions.htm#InStr">InStr()</a> use the <em>locale</em> method described below.</p>
      <p><strong>Off</strong> (starting default): The letters A-Z are considered identical to their lowercase counterparts. This is the starting default for all scripts due to backward compatibility and performance (<em>Locale</em> is 1 to 8 times slower than <em>Off</em> depending on the nature of the strings being compared).</p>
      <p><strong><a name="Locale"></a>Locale</strong> <span class="ver">[v1.0.43.03+]:</span> String comparisons are case <strong>in</strong>sensitive according to the rules of the current user's locale. For example, most English and Western European locales treat not only the letters A-Z as identical to their lowercase counterparts, but also ANSI letters like &Auml; and &Uuml; as identical to theirs.</p></dd>

</dl>

<h3>Remarks</h3>
<p>This setting applies to:</p>
<ul>
  <li><a href="../Variables.htm#equal">Expression comparison operators</a> (except ==). However, since the <a href="../Variables.htm#equal">equal-sign operator (=)</a> is always case-insensitive, it uses the <em>Locale</em> mode when <em>StringCaseSense</em> is <em>On</em>, as does the case-insensitive mode of <a href="../Functions.htm#InStr">InStr()</a>.</li>
  <li><a href="IfInString.htm">IfInString</a>, <a href="StringGetPos.htm">StringGetPos</a>, and <a href="../Functions.htm#InStr">InStr()</a>. However, InStr() is not affected when its <em>CaseSensitive</em> parameter is <em>true</em>.</li>
  <li><a href="StringReplace.htm">StringReplace</a></li>
  <li><a href="IfIn.htm">if var in/contains MatchList</a>, <a href="IfBetween.htm">if var between</a>, and <a href="IfEqual.htm">IfEqual and its family</a>.</li>
  <li><span class="ver">[AHK_L 42+]:</span> <a href="IfIs.htm">if var is [not] type</a> respects the system locale only if the <i>Locale</i> mode is in effect.</li>
</ul>
<p>The built-in variable <strong>A_StringCaseSense</strong> contains the current setting (the word On, Off, or Locale).</p>
<p>Every newly launched <a href="../misc/Threads.htm">thread</a> (such as a <a href="../Hotkeys.htm">hotkey</a>, <a href="Menu.htm">custom menu item</a>, or <a href="SetTimer.htm">timed</a> subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).</p>
<h3>Related</h3>
<p><a href="IfEqual.htm">IfEqual</a>, <a href="IfInString.htm">IfInString</a>, <a href="IfBetween.htm">if var between</a>, <a href="StringReplace.htm">StringReplace</a>, <a href="StringGetPos.htm">StringGetPos</a></p>
<h3>Example</h3>
<pre class="NoIndent">StringCaseSense Locale</pre>

</body>
</html>
